
import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;


public class FileUtils {
	
	/** 
	* @usage: compukat.io.Write.fileOutputStream(String fileName,boolean 
	append,String theText):void 
	*/ 
	
	static String curDir = System.getProperty("user.dir");
	

	public static void fileOutputStream(String fileName,boolean append,String 
	theText) 
	            throws IOException { 

	  FileOutputStream file = new FileOutputStream(fileName,append); 
	  DataOutputStream out   = new DataOutputStream(file); 
	  out.writeBytes(theText); 
	  out.flush(); 
	  out.close(); 
	} 
	
	public static void escreveNoArquivo(String conteudo, String nomeArquivo) 
    throws IOException { 
		
		fileOutputStream(nomeArquivo, true, conteudo + System.getProperty("line.separator")); 
	}

}
